<!-- 文章详情 -->
<template>
    <div>
        <Header />
        <div class="container" id="detail">
            <el-row :gutter="30">
                <el-col :sm="24" :md="16" style="transition:all .5s ease-out;margin-bottom:30px;">
                    <ArticleDetail />
                    <Message />
                </el-col>
                <el-col :sm="24" :md="8">
                    <Rightlist />
                </el-col>
            </el-row>
        </div>
        <Foot />
    </div>
</template>

<script>
import header from '../components/header.vue'
import rightlist from '../components/rightlist.vue'
import articleDetail from '../components/articleDetail.vue'
import message from '../components/message.vue'
import footer from '../components/footer.vue'
    export default {
        name:'DetailShare',
        components: { //定义组件
            'Header':header,
            'ArticleDetail':articleDetail,
            'Message':message,
            'Rightlist':rightlist,
            'Foot':footer
        },
        mounted(){
            var anchor = document.querySelector("#detail");
            // console.log(anchor,anchor.offsetTop);
            var top = anchor.offsetTop-60;
            document.body.scrollTop = top;
             // Firefox
             document.documentElement.scrollTop = top;
             // Safari
             window.pageYOffset = top;
        }
    }
</script>